package servererror

import (
	"runtime"
)

type ServerError struct {
	Error      error
	Message    string
	Code       int
	StackTrace []byte
}

func NewServerError(e error, m string, c int) *ServerError {
	buf := make([]byte, 1024)
	runtime.Stack(buf, false)
	return &ServerError{e, m, c, buf}
}
